import struct

#from other_idl import *

class LocationResult :
	LOCATION_SUCCESS = 0
	LOCATION_FAIL = 1
	LOCATION_NOT_EXIST_USER = 2
	LOCATION_NOT_EXIST_TARGET_USER = 3
def LocationResultInit() : 
	return 0
def LocationResultStore(e) :
	data = ''
	data += struct.pack('i', e)
	return data
def LocationResultLoad(buf) :
	val = struct.unpack('i', buf[0:4])[0]; buf = buf[4:]
	return [val, buf]
class LocationOpenAck :
	MSG_ID = 1
	def __init__(self) :
		pass
	def Store(self) :
		data = ''
		return data
	def Load(self, buf) :
		return buf
def LocationOpenAckInit() :
	return LocationOpenAck()
def LocationOpenAckStore(o) :
	return o.Store()
def LocationOpenAckLoad(buf) :
	val = LocationOpenAck()
	buf = val.Load(buf)
	return [val, buf]
class LocationCloseAck :
	MSG_ID = 2
	def __init__(self) :
		pass
	def Store(self) :
		data = ''
		return data
	def Load(self, buf) :
		return buf
def LocationCloseAckInit() :
	return LocationCloseAck()
def LocationCloseAckStore(o) :
	return o.Store()
def LocationCloseAckLoad(buf) :
	val = LocationCloseAck()
	buf = val.Load(buf)
	return [val, buf]
class RegistSyn :
	MSG_ID = 8001
	def __init__(self) :
		self.seq = 0			# uint32
	def Store(self) :
		data = ''
		data += struct.pack('I', self.seq)
		return data
	def Load(self, buf) :
		self.seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		return buf
def RegistSynInit() :
	return RegistSyn()
def RegistSynStore(o) :
	return o.Store()
def RegistSynLoad(buf) :
	val = RegistSyn()
	buf = val.Load(buf)
	return [val, buf]
class RegistAck :
	MSG_ID = 8002
	def __init__(self) :
		self.seq = 0			# uint32
		self.result = LocationResultInit()			# LocationResult
		self.strError = ''			# string
	def Store(self) :
		data = ''
		data += struct.pack('I', self.seq)
		data += LocationResultStore(self.result)
		data += struct.pack('i', len(self.strError))
		fmt = str(len(self.strError)) + 's'
		data += struct.pack(fmt, self.strError)
		return data
	def Load(self, buf) :
		self.seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		[self.result, buf] = LocationResultLoad(buf)
		str_length = struct.unpack('i', buf[0:4])[0]; buf = buf[4:]
		self.strError = buf[0:str_length]; buf = buf[str_length:]
		return buf
def RegistAckInit() :
	return RegistAck()
def RegistAckStore(o) :
	return o.Store()
def RegistAckLoad(buf) :
	val = RegistAck()
	buf = val.Load(buf)
	return [val, buf]
class UnRegistSyn :
	MSG_ID = 8003
	def __init__(self) :
		self.seq = 0			# uint32
	def Store(self) :
		data = ''
		data += struct.pack('I', self.seq)
		return data
	def Load(self, buf) :
		self.seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		return buf
def UnRegistSynInit() :
	return UnRegistSyn()
def UnRegistSynStore(o) :
	return o.Store()
def UnRegistSynLoad(buf) :
	val = UnRegistSyn()
	buf = val.Load(buf)
	return [val, buf]
class UnRegistAck :
	MSG_ID = 8004
	def __init__(self) :
		self.seq = 0			# uint32
		self.result = LocationResultInit()			# LocationResult
		self.strError = ''			# string
	def Store(self) :
		data = ''
		data += struct.pack('I', self.seq)
		data += LocationResultStore(self.result)
		data += struct.pack('i', len(self.strError))
		fmt = str(len(self.strError)) + 's'
		data += struct.pack(fmt, self.strError)
		return data
	def Load(self, buf) :
		self.seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		[self.result, buf] = LocationResultLoad(buf)
		str_length = struct.unpack('i', buf[0:4])[0]; buf = buf[4:]
		self.strError = buf[0:str_length]; buf = buf[str_length:]
		return buf
def UnRegistAckInit() :
	return UnRegistAck()
def UnRegistAckStore(o) :
	return o.Store()
def UnRegistAckLoad(buf) :
	val = UnRegistAck()
	buf = val.Load(buf)
	return [val, buf]
class KickUser :
	MSG_ID = 8005
	def __init__(self) :
		self.seq = 0			# uint32
	def Store(self) :
		data = ''
		data += struct.pack('I', self.seq)
		return data
	def Load(self, buf) :
		self.seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		return buf
def KickUserInit() :
	return KickUser()
def KickUserStore(o) :
	return o.Store()
def KickUserLoad(buf) :
	val = KickUser()
	buf = val.Load(buf)
	return [val, buf]
class ChatSyn :
	MSG_ID = 8006
	def __init__(self) :
		self.type = 0			# uint32
		self.sender_seq = 0			# uint32
		self.receiver_seq = 0			# uint32
		self.sender_nick = ''			# string
		self.msgs = ''			# string
	def Store(self) :
		data = ''
		data += struct.pack('I', self.type)
		data += struct.pack('I', self.sender_seq)
		data += struct.pack('I', self.receiver_seq)
		data += struct.pack('i', len(self.sender_nick))
		fmt = str(len(self.sender_nick)) + 's'
		data += struct.pack(fmt, self.sender_nick)
		data += struct.pack('i', len(self.msgs))
		fmt = str(len(self.msgs)) + 's'
		data += struct.pack(fmt, self.msgs)
		return data
	def Load(self, buf) :
		self.type = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.sender_seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.receiver_seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		str_length = struct.unpack('i', buf[0:4])[0]; buf = buf[4:]
		self.sender_nick = buf[0:str_length]; buf = buf[str_length:]
		str_length = struct.unpack('i', buf[0:4])[0]; buf = buf[4:]
		self.msgs = buf[0:str_length]; buf = buf[str_length:]
		return buf
def ChatSynInit() :
	return ChatSyn()
def ChatSynStore(o) :
	return o.Store()
def ChatSynLoad(buf) :
	val = ChatSyn()
	buf = val.Load(buf)
	return [val, buf]
class ChatAck :
	MSG_ID = 8007
	def __init__(self) :
		self.type = 0			# uint32
		self.sender_seq = 0			# uint32
		self.receiver_seq = 0			# uint32
		self.result = LocationResultInit()			# LocationResult
	def Store(self) :
		data = ''
		data += struct.pack('I', self.type)
		data += struct.pack('I', self.sender_seq)
		data += struct.pack('I', self.receiver_seq)
		data += LocationResultStore(self.result)
		return data
	def Load(self, buf) :
		self.type = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.sender_seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.receiver_seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		[self.result, buf] = LocationResultLoad(buf)
		return buf
def ChatAckInit() :
	return ChatAck()
def ChatAckStore(o) :
	return o.Store()
def ChatAckLoad(buf) :
	val = ChatAck()
	buf = val.Load(buf)
	return [val, buf]
class RecallSyn :
	MSG_ID = 8008
	def __init__(self) :
		self.sender_seq = 0			# uint32
		self.receiver_seq = 0			# uint32
		self.ip = ''			# string
		self.port = 0			# uint32
		self.server_id = 0			# uint32
		self.channel_id = 0			# uint32
	def Store(self) :
		data = ''
		data += struct.pack('I', self.sender_seq)
		data += struct.pack('I', self.receiver_seq)
		data += struct.pack('i', len(self.ip))
		fmt = str(len(self.ip)) + 's'
		data += struct.pack(fmt, self.ip)
		data += struct.pack('I', self.port)
		data += struct.pack('I', self.server_id)
		data += struct.pack('I', self.channel_id)
		return data
	def Load(self, buf) :
		self.sender_seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.receiver_seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		str_length = struct.unpack('i', buf[0:4])[0]; buf = buf[4:]
		self.ip = buf[0:str_length]; buf = buf[str_length:]
		self.port = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.server_id = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.channel_id = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		return buf
def RecallSynInit() :
	return RecallSyn()
def RecallSynStore(o) :
	return o.Store()
def RecallSynLoad(buf) :
	val = RecallSyn()
	buf = val.Load(buf)
	return [val, buf]
class RecallAck :
	MSG_ID = 8009
	def __init__(self) :
		self.sender_seq = 0			# uint32
		self.receiver_seq = 0			# uint32
		self.is_accept = 0			# uint16
		self.result = LocationResultInit()			# LocationResult
	def Store(self) :
		data = ''
		data += struct.pack('I', self.sender_seq)
		data += struct.pack('I', self.receiver_seq)
		data += struct.pack('H', self.is_accept)
		data += LocationResultStore(self.result)
		return data
	def Load(self, buf) :
		self.sender_seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.receiver_seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.is_accept = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		[self.result, buf] = LocationResultLoad(buf)
		return buf
def RecallAckInit() :
	return RecallAck()
def RecallAckStore(o) :
	return o.Store()
def RecallAckLoad(buf) :
	val = RecallAck()
	buf = val.Load(buf)
	return [val, buf]
class TradeItemSoldoutSyn :
	MSG_ID = 8010
	def __init__(self) :
		self.buyer_characterseq = 0			# uint32
		self.seller_userseq = 0			# uint32
		self.item_trade_seq = 0			# uint64
		self.item_class_type = 0			# int32
		self.item_sheet_type = 0			# uint32
	def Store(self) :
		data = ''
		data += struct.pack('I', self.buyer_characterseq)
		data += struct.pack('I', self.seller_userseq)
		data += struct.pack('Q', self.item_trade_seq)
		data += struct.pack('i', self.item_class_type)
		data += struct.pack('I', self.item_sheet_type)
		return data
	def Load(self, buf) :
		self.buyer_characterseq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.seller_userseq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.item_trade_seq = struct.unpack('Q', buf[0:8])[0]; buf = buf[8:]
		self.item_class_type = struct.unpack('i', buf[0:4])[0]; buf = buf[4:]
		self.item_sheet_type = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		return buf
def TradeItemSoldoutSynInit() :
	return TradeItemSoldoutSyn()
def TradeItemSoldoutSynStore(o) :
	return o.Store()
def TradeItemSoldoutSynLoad(buf) :
	val = TradeItemSoldoutSyn()
	buf = val.Load(buf)
	return [val, buf]
class SetMainCharacterInfoSyn :
	MSG_ID = 8011
	def __init__(self) :
		self.seq = 0			# uint32
		self.level = 0			# uint16
		self.class_type = 0			# uint16
		self.head = 0			# uint16
		self.armor = 0			# uint16
		self.weapon = 0			# uint16
		self.side_hand = 0			# uint16
		self.effect = 0			# uint16
		self.pet_tid = 0			# int16
		self.profile_opened = 0			# uint16
		self.gender = 0			# uint16
		self.gender_open = 0			# uint16
		self.birthday_open = 0			# uint16
		self.strBirthday = ''			# string
	def Store(self) :
		data = ''
		data += struct.pack('I', self.seq)
		data += struct.pack('H', self.level)
		data += struct.pack('H', self.class_type)
		data += struct.pack('H', self.head)
		data += struct.pack('H', self.armor)
		data += struct.pack('H', self.weapon)
		data += struct.pack('H', self.side_hand)
		data += struct.pack('H', self.effect)
		data += struct.pack('h', self.pet_tid)
		data += struct.pack('H', self.profile_opened)
		data += struct.pack('H', self.gender)
		data += struct.pack('H', self.gender_open)
		data += struct.pack('H', self.birthday_open)
		data += struct.pack('i', len(self.strBirthday))
		fmt = str(len(self.strBirthday)) + 's'
		data += struct.pack(fmt, self.strBirthday)
		return data
	def Load(self, buf) :
		self.seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.level = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.class_type = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.head = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.armor = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.weapon = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.side_hand = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.effect = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.pet_tid = struct.unpack('h', buf[0:2])[0]; buf = buf[2:]
		self.profile_opened = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.gender = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.gender_open = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.birthday_open = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		str_length = struct.unpack('i', buf[0:4])[0]; buf = buf[4:]
		self.strBirthday = buf[0:str_length]; buf = buf[str_length:]
		return buf
def SetMainCharacterInfoSynInit() :
	return SetMainCharacterInfoSyn()
def SetMainCharacterInfoSynStore(o) :
	return o.Store()
def SetMainCharacterInfoSynLoad(buf) :
	val = SetMainCharacterInfoSyn()
	buf = val.Load(buf)
	return [val, buf]
class SetMainCharacterInfoAck :
	MSG_ID = 8012
	def __init__(self) :
		self.seq = 0			# uint32
		self.result = 0			# int16
	def Store(self) :
		data = ''
		data += struct.pack('I', self.seq)
		data += struct.pack('h', self.result)
		return data
	def Load(self, buf) :
		self.seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.result = struct.unpack('h', buf[0:2])[0]; buf = buf[2:]
		return buf
def SetMainCharacterInfoAckInit() :
	return SetMainCharacterInfoAck()
def SetMainCharacterInfoAckStore(o) :
	return o.Store()
def SetMainCharacterInfoAckLoad(buf) :
	val = SetMainCharacterInfoAck()
	buf = val.Load(buf)
	return [val, buf]
class GetMainCharacterInfoSyn :
	MSG_ID = 8013
	def __init__(self) :
		self.seq = 0			# uint32
		self.target_seq = 0			# uint32
	def Store(self) :
		data = ''
		data += struct.pack('I', self.seq)
		data += struct.pack('I', self.target_seq)
		return data
	def Load(self, buf) :
		self.seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.target_seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		return buf
def GetMainCharacterInfoSynInit() :
	return GetMainCharacterInfoSyn()
def GetMainCharacterInfoSynStore(o) :
	return o.Store()
def GetMainCharacterInfoSynLoad(buf) :
	val = GetMainCharacterInfoSyn()
	buf = val.Load(buf)
	return [val, buf]
class GetMainCharacterInfoAck :
	MSG_ID = 8014
	def __init__(self) :
		self.seq = 0			# uint32
		self.result = 0			# int16
		self.target_seq = 0			# uint32
		self.level = 0			# uint16
		self.class_type = 0			# uint16
		self.head = 0			# uint16
		self.armor = 0			# uint16
		self.weapon = 0			# uint16
		self.side_hand = 0			# uint16
		self.effect = 0			# uint16
		self.pet_tid = 0			# int16
	def Store(self) :
		data = ''
		data += struct.pack('I', self.seq)
		data += struct.pack('h', self.result)
		data += struct.pack('I', self.target_seq)
		data += struct.pack('H', self.level)
		data += struct.pack('H', self.class_type)
		data += struct.pack('H', self.head)
		data += struct.pack('H', self.armor)
		data += struct.pack('H', self.weapon)
		data += struct.pack('H', self.side_hand)
		data += struct.pack('H', self.effect)
		data += struct.pack('h', self.pet_tid)
		return data
	def Load(self, buf) :
		self.seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.result = struct.unpack('h', buf[0:2])[0]; buf = buf[2:]
		self.target_seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.level = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.class_type = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.head = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.armor = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.weapon = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.side_hand = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.effect = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.pet_tid = struct.unpack('h', buf[0:2])[0]; buf = buf[2:]
		return buf
def GetMainCharacterInfoAckInit() :
	return GetMainCharacterInfoAck()
def GetMainCharacterInfoAckStore(o) :
	return o.Store()
def GetMainCharacterInfoAckLoad(buf) :
	val = GetMainCharacterInfoAck()
	buf = val.Load(buf)
	return [val, buf]
class GetMainCharacterInfoSyn_V2 :
	MSG_ID = 8015
	def __init__(self) :
		self.seq = 0			# uint32
		self.target_seq = 0			# uint32
	def Store(self) :
		data = ''
		data += struct.pack('I', self.seq)
		data += struct.pack('I', self.target_seq)
		return data
	def Load(self, buf) :
		self.seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.target_seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		return buf
def GetMainCharacterInfoSyn_V2Init() :
	return GetMainCharacterInfoSyn_V2()
def GetMainCharacterInfoSyn_V2Store(o) :
	return o.Store()
def GetMainCharacterInfoSyn_V2Load(buf) :
	val = GetMainCharacterInfoSyn_V2()
	buf = val.Load(buf)
	return [val, buf]
class GetMainCharacterInfoAck_V2 :
	MSG_ID = 8016
	def __init__(self) :
		self.seq = 0			# uint32
		self.result = 0			# int16
		self.target_seq = 0			# uint32
		self.level = 0			# uint16
		self.class_type = 0			# uint16
		self.head = 0			# uint16
		self.armor = 0			# uint16
		self.weapon = 0			# uint16
		self.side_hand = 0			# uint16
		self.effect = 0			# uint16
		self.pet_tid = 0			# int16
		self.profile_opened = 0			# uint16
		self.gender = 0			# uint16
		self.gender_open = 0			# uint16
		self.birthday_open = 0			# uint16
		self.strBirthday = ''			# string
	def Store(self) :
		data = ''
		data += struct.pack('I', self.seq)
		data += struct.pack('h', self.result)
		data += struct.pack('I', self.target_seq)
		data += struct.pack('H', self.level)
		data += struct.pack('H', self.class_type)
		data += struct.pack('H', self.head)
		data += struct.pack('H', self.armor)
		data += struct.pack('H', self.weapon)
		data += struct.pack('H', self.side_hand)
		data += struct.pack('H', self.effect)
		data += struct.pack('h', self.pet_tid)
		data += struct.pack('H', self.profile_opened)
		data += struct.pack('H', self.gender)
		data += struct.pack('H', self.gender_open)
		data += struct.pack('H', self.birthday_open)
		data += struct.pack('i', len(self.strBirthday))
		fmt = str(len(self.strBirthday)) + 's'
		data += struct.pack(fmt, self.strBirthday)
		return data
	def Load(self, buf) :
		self.seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.result = struct.unpack('h', buf[0:2])[0]; buf = buf[2:]
		self.target_seq = struct.unpack('I', buf[0:4])[0]; buf = buf[4:]
		self.level = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.class_type = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.head = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.armor = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.weapon = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.side_hand = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.effect = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.pet_tid = struct.unpack('h', buf[0:2])[0]; buf = buf[2:]
		self.profile_opened = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.gender = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.gender_open = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		self.birthday_open = struct.unpack('H', buf[0:2])[0]; buf = buf[2:]
		str_length = struct.unpack('i', buf[0:4])[0]; buf = buf[4:]
		self.strBirthday = buf[0:str_length]; buf = buf[str_length:]
		return buf
def GetMainCharacterInfoAck_V2Init() :
	return GetMainCharacterInfoAck_V2()
def GetMainCharacterInfoAck_V2Store(o) :
	return o.Store()
def GetMainCharacterInfoAck_V2Load(buf) :
	val = GetMainCharacterInfoAck_V2()
	buf = val.Load(buf)
	return [val, buf]
